[PATCH] D28394: [AliasAnalysis] Limit `MemoryLocation` retrieval to valid intrinsic arguments.

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 10 11:30:37 PST 2017


hfinkel added inline comments.


================
Comment at: lib/Analysis/MemoryLocation.cpp:125
+      if (ArgIdx == 0)
+        // Technically, this is a token gotten from a previous invariant_start
+        // and not a true pointer, so return a dummy MemoryLocation.
----------------
token gotten from -> token from


================
Comment at: lib/Analysis/MemoryLocation.cpp:133
+      // For all other argument indices, this call is invalid.
+      assert(false && "Invalid argument index");
 
----------------
Use llvm_unreachable instead of assert(false).


Repository:
  rL LLVM

https://reviews.llvm.org/D28394





More information about the llvm-commits mailing list