IRBuilder: Remove redundant check around SetInstDebugLocation call.
authorDavid Blaikie <dblaikie@gmail.com>
Sat, 26 Jan 2013 21:55:19 +0000 (21:55 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Sat, 26 Jan 2013 21:55:19 +0000 (21:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173591 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/IR/IRBuilder.h

index e2ec481d070d2e360edebaa22d1fba32fc876e36..a137bbf7fa34fae87bfcc34d1580b4167c23de53 100644 (file)
@@ -428,8 +428,7 @@ public:
   template<typename InstTy>
   InstTy *Insert(InstTy *I, const Twine &Name = "") const {
     this->InsertHelper(I, Name, BB, InsertPt);
-    if (!getCurrentDebugLocation().isUnknown())
-      this->SetInstDebugLocation(I);
+    this->SetInstDebugLocation(I);
     return I;
   }