We can't use arbitrary pointers inside of the GEP instruction. What we really need is a pointer which points to the sized object. There are potentially more constraints if we will ever generate more than a single index but this should work for now.
Details
Diff Detail
Event Timeline
unittests/FuzzMutate/OperationsTest.cpp | ||
---|---|---|
16–19 | Please keep these sorted. clang-format can do that for you. | |
57–59 | I don't know gtest all that well, but is putting all of this in an anonymous namespace the right thing to do here? Why not just make parseAssembly static? | |
179–180 | Apparently phabricator only shows the diff here in the email and not the we interface, but what's with the arbitrary whitespace changes on these Function::Create calls? According to clang-format, the old way is correct. | |
294–298 | I feel like these would be easier to understand / wouldn't need the comments if we create the instructions programmatically like in the other tests in this file rather than parsing it. |
unittests/FuzzMutate/OperationsTest.cpp | ||
---|---|---|
57–59 | I see anonymous namespace in the official gtest examples and in many llvm test sets. So I guess it's the right thing to do. | |
179–180 | Hm, didn't notice those. Will run clang format, thanks. | |
294–298 | I tried this way but it seemed harder to read, harder to write and more error prone. After all we want to generate llvm ir code and there is no more natural way than to write it directly. |
Please keep these sorted. clang-format can do that for you.