[PATCH] D24849: Make CanUseCopyRelocWithPIE a llc option, -pie-copy-relocations

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 11 16:26:14 PDT 2016


rnk added inline comments.


================
Comment at: lib/Target/TargetMachine.cpp:152
+    bool IsAccessViaCopyRelocs =
+        !isa<Function>(GV) && Options.MCOptions.MCPIECopyRelocations;
     // Check if we can use copy relocations.
----------------
GV could be a GlobalAlias to a function, so I think this would be better as `isa<GlobalVariable>(GV)` instead of not a function. That's worth adding as a test case too, if you could


https://reviews.llvm.org/D24849





More information about the llvm-commits mailing list