[PATCH] D52210: [LLVM-C] Add C APIs to access DebugLoc info
Aditya Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 24 08:06:39 PDT 2018
hiraditya added inline comments.
================
Comment at: lib/IR/Core.cpp:1188
+ }
+ assert(0 && "Expected Instruction, GlobalVariable or Function");
+}
----------------
abdulras wrote:
> This is going to get "optimized" away in `NDEBUG` builds. If you hoist the `S` out of the cases, and sink the `Length` assignment and `return`, you at least get predictable behaviour.
This assert will not trigger in a release build. Is there a better way to handle this?
================
Comment at: lib/IR/Core.cpp:1218
+ }
+ assert(0 && "Expected Instruction, GlobalVariable or Function");
+}
----------------
Same as above
Repository:
rL LLVM
https://reviews.llvm.org/D52210
More information about the llvm-commits
mailing list