aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/DynamicLibrary.cpp
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2013-01-13 11:26:44 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2013-01-13 11:26:44 +0000
commit7ab4fbf5c2981af166e651c84556073daa12008f (patch)
tree14be402d133b413c67fe429a050abe6420b39a5f /llvm/lib/Support/DynamicLibrary.cpp
parent48cb3b97c7d319b44ecbdd028472c9ef38df6631 (diff)
downloadllvm-7ab4fbf5c2981af166e651c84556073daa12008f.zip
llvm-7ab4fbf5c2981af166e651c84556073daa12008f.tar.gz
llvm-7ab4fbf5c2981af166e651c84556073daa12008f.tar.bz2
CGBuiltin.cpp: Fix abuse of ArrayRef in EmitOverflowIntrinsic().
In ArrayRef<T>(X), X should not be temporary value. It could be rewritten more redundantly; llvm::Type *XTy = X->getType(); ArrayRef<llvm::Type *> Ty(XTy); llvm::Value *Callee = CGF.CGM.getIntrinsic(IntrinsicID, Ty); Since it is safe if both XTy and Ty are temporary value in one statement, it could be shorten; llvm::Value *Callee = CGF.CGM.getIntrinsic(IntrinsicID, ArrayRef<llvm::Type*>(X->getType())); ArrayRef<T> has an implicit constructor to create uni-entry of T; llvm::Value *Callee = CGF.CGM.getIntrinsic(IntrinsicID, X->getType()); MSVC-generated clang.exe crashed. llvm-svn: 172352
Diffstat (limited to 'llvm/lib/Support/DynamicLibrary.cpp')
0 files changed, 0 insertions, 0 deletions