diff options
author | Bill Wendling <isanbard@gmail.com> | 2018-11-20 08:53:30 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2018-11-20 08:53:30 +0000 |
commit | 107b0e9881c87dba9f51109bae70b63d9e444546 (patch) | |
tree | c2bcc110804ddf7dca9704e3a47a2f26a6e2bcd5 /clang/lib/AST/ASTImporter.cpp | |
parent | cabb36d38d9e71610c7767a22477576aa8a4d9fa (diff) | |
download | bcm5719-llvm-107b0e9881c87dba9f51109bae70b63d9e444546.tar.gz bcm5719-llvm-107b0e9881c87dba9f51109bae70b63d9e444546.zip |
Use is.constant intrinsic for __builtin_constant_p
Summary:
A __builtin_constant_p may end up with a constant after inlining. Use
the is.constant intrinsic if it's a variable that's in a context where
it may resolve to a constant, e.g., an argument to a function after
inlining.
Reviewers: rsmith, shafik
Subscribers: jfb, kristina, cfe-commits, nickdesaulniers, jyknight
Differential Revision: https://reviews.llvm.org/D54355
llvm-svn: 347294
Diffstat (limited to 'clang/lib/AST/ASTImporter.cpp')
-rw-r--r-- | clang/lib/AST/ASTImporter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/ASTImporter.cpp b/clang/lib/AST/ASTImporter.cpp index 486fd4d43ae..8c80ecd1e67 100644 --- a/clang/lib/AST/ASTImporter.cpp +++ b/clang/lib/AST/ASTImporter.cpp @@ -6375,7 +6375,7 @@ ExpectedStmt ASTNodeImporter::VisitConstantExpr(ConstantExpr *E) { Expr *ToSubExpr; std::tie(ToSubExpr) = *Imp; - return new (Importer.getToContext()) ConstantExpr(ToSubExpr); + return ConstantExpr::Create(Importer.getToContext(), ToSubExpr); } ExpectedStmt ASTNodeImporter::VisitParenExpr(ParenExpr *E) { |