Index: lib/CodeGen/CodeGenFunction.h =================================================================== --- lib/CodeGen/CodeGenFunction.h +++ lib/CodeGen/CodeGenFunction.h @@ -1849,11 +1849,7 @@ llvm::BasicBlock *createBasicBlock(const Twine &name = "", llvm::Function *parent = nullptr, llvm::BasicBlock *before = nullptr) { -#ifdef NDEBUG - return llvm::BasicBlock::Create(getLLVMContext(), "", parent, before); -#else return llvm::BasicBlock::Create(getLLVMContext(), name, parent, before); -#endif } /// getBasicBlockForLabel - Return the LLVM basicblock that the specified Index: test/CodeGenCXX/discard-name-values.cpp =================================================================== --- test/CodeGenCXX/discard-name-values.cpp +++ test/CodeGenCXX/discard-name-values.cpp @@ -1,10 +1,29 @@ -// RUN: %clang_cc1 -emit-llvm -triple=armv7-apple-darwin -emit-llvm -std=c++11 %s -o - -O1 | FileCheck %s -// RUN: %clang_cc1 -emit-llvm -triple=armv7-apple-darwin -emit-llvm -std=c++11 %s -o - -O1 -discard-value-names | FileCheck %s --check-prefix=DISCARDVALUE +// RUN: %clang_cc1 -emit-llvm -triple=armv7-apple-darwin -std=c++11 %s -o - -O1 \ +// RUN: | FileCheck %s +// RUN: %clang_cc1 -emit-llvm -triple=armv7-apple-darwin -std=c++11 %s -o - -O1 \ +// RUN: -discard-value-names | FileCheck %s --check-prefix=DISCARDVALUE -int foo(int bar) { - return bar; -} +extern "C" void branch(); + +bool test(bool pred) { + // DISCARDVALUE: br i1 %0, label %2, label %3 + // CHECK: br i1 %pred, label %if.then, label %if.end + + if (pred) { + // DISCARDVALUE: ;