summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2015-06-13 01:16:10 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2015-06-13 01:16:10 +0000
commitf6a9f0e112f396471709c7f5897375dceba9f251 (patch)
tree23f946c336d3bc3b8a7689ee0c3a9088bc407e91 /clang/lib/CodeGen
parentbfb5368cc7504728b73374e5c204dd957a652325 (diff)
downloadbcm5719-llvm-f6a9f0e112f396471709c7f5897375dceba9f251.tar.gz
bcm5719-llvm-f6a9f0e112f396471709c7f5897375dceba9f251.zip
[CodeGen] Don't evaluate immediate inlineasm arguments using isICE().
Instead, just EvaluateAsInt(). Follow-up to r239549: rsmith points out that isICE() is expensive; seems like it's not the right concept anyway, as it fails on `static const' in C, and will actually trigger the assert below on: test/Sema/inline-asm-validate-x86.c llvm-svn: 239651
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGStmt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp
index 57f55aacfa6..a79b3e33235 100644
--- a/clang/lib/CodeGen/CGStmt.cpp
+++ b/clang/lib/CodeGen/CGStmt.cpp
@@ -1754,7 +1754,7 @@ llvm::Value* CodeGenFunction::EmitAsmInput(
// (immediate or symbolic), try to emit it as such.
if (!Info.allowsRegister() && !Info.allowsMemory()) {
llvm::APSInt Result;
- if (InputExpr->isIntegerConstantExpr(Result, getContext()))
+ if (InputExpr->EvaluateAsInt(Result, getContext()))
return llvm::ConstantInt::get(getLLVMContext(), Result);
assert(!Info.requiresImmediateConstant() &&
"Required-immediate inlineasm arg isn't constant?");
OpenPOWER on IntegriCloud