diff options
author | Erich Keane <erich.keane@intel.com> | 2018-12-18 16:22:21 +0000 |
---|---|---|
committer | Erich Keane <erich.keane@intel.com> | 2018-12-18 16:22:21 +0000 |
commit | 2a4eea3061bc2c875bfacb4a1858d42036938b66 (patch) | |
tree | f5225f69a3604d73d5ce863b0934a16874d21fa4 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | b748c0e696602cd8371c875a3eb337b8b221800d (diff) | |
download | bcm5719-llvm-2a4eea3061bc2c875bfacb4a1858d42036938b66.tar.gz bcm5719-llvm-2a4eea3061bc2c875bfacb4a1858d42036938b66.zip |
[NFC] Fix usage of Builder.insert(new Bitcast...)in CodeGenFunction
This is exactly a "CreateBitCast", so refactor this to get rid of a
'new'.
Note that this slightly changes the test, as the Builder is now
seemingly smart enough to fold one of the bitcasts into the annotation
call.
Change-Id: I1733fb1fdf91f5c9d88651067130b9a4e7b5ab67
llvm-svn: 349506
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index f012384f3d2..123ece2cac7 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -2243,7 +2243,7 @@ Address CodeGenFunction::EmitFieldAnnotations(const FieldDecl *D, // annotation on the first field of a struct and annotation on the struct // itself. if (VTy != CGM.Int8PtrTy) - V = Builder.Insert(new llvm::BitCastInst(V, CGM.Int8PtrTy)); + V = Builder.CreateBitCast(V, CGM.Int8PtrTy); V = EmitAnnotationCall(F, V, I->getAnnotation(), D->getLocation()); V = Builder.CreateBitCast(V, VTy); } |