diff options
author | yronglin <yronglin777@gmail.com> | 2022-09-03 23:24:37 +0800 |
---|---|---|
committer | yronglin <yronglin777@gmail.com> | 2022-09-03 23:26:01 +0800 |
commit | 3ad2fe913ae08ca062105731ad2da2eae825c731 (patch) | |
tree | 765b532ef34414b26d49e67116acb979aecc7089 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 5aee2726d8a6cb1698b11574ebb0e0499369a3d2 (diff) | |
download | llvm-3ad2fe913ae08ca062105731ad2da2eae825c731.zip llvm-3ad2fe913ae08ca062105731ad2da2eae825c731.tar.gz llvm-3ad2fe913ae08ca062105731ad2da2eae825c731.tar.bz2 |
[Clang][CodeGen] Avoid __builtin_assume_aligned crash when the 1st arg is array type
Avoid __builtin_assume_aligned crash when the 1st arg is array type(or string literal).
Open issue: https://github.com/llvm/llvm-project/issues/57169
Reviewed By: rjmccall
Differential Revision: https://reviews.llvm.org/D133202
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 81c687e..0b75f03 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -2443,8 +2443,6 @@ void CodeGenFunction::emitAlignmentAssumption(llvm::Value *PtrValue, SourceLocation AssumptionLoc, llvm::Value *Alignment, llvm::Value *OffsetValue) { - if (auto *CE = dyn_cast<CastExpr>(E)) - E = CE->getSubExprAsWritten(); QualType Ty = E->getType(); SourceLocation Loc = E->getExprLoc(); |