summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/IR/LLVMContext.h2
-rw-r--r--llvm/lib/AsmParser/LLParser.cpp2
-rw-r--r--llvm/lib/IR/LLVMContext.cpp2
-rw-r--r--llvm/lib/IR/Value.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/llvm/include/llvm/IR/LLVMContext.h b/llvm/include/llvm/IR/LLVMContext.h
index e1d26278e5e..415c1fea915 100644
--- a/llvm/include/llvm/IR/LLVMContext.h
+++ b/llvm/include/llvm/IR/LLVMContext.h
@@ -108,7 +108,7 @@ public:
/// Return true if the Context runtime configuration is set to discard all
/// value names. When true, only GlobalValue names will be available in the
/// IR.
- bool discardValueNames() const;
+ bool shouldDiscardValueNames() const;
/// Set the Context runtime configuration to discard all value name (but
/// GlobalValue). Clients can use this flag to save memory and runtime,
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index d326edfd63f..c3021980346 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -46,7 +46,7 @@ bool LLParser::Run() {
// Prime the lexer.
Lex.Lex();
- if (Context.discardValueNames())
+ if (Context.shouldDiscardValueNames())
return Error(
Lex.getLoc(),
"Can't read textual IR with a Context that discards named Values");
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp
index 6781780e172..f6adecbd91c 100644
--- a/llvm/lib/IR/LLVMContext.cpp
+++ b/llvm/lib/IR/LLVMContext.cpp
@@ -313,7 +313,7 @@ void LLVMContext::deleteGC(const Function &Fn) {
pImpl->GCNames.erase(&Fn);
}
-bool LLVMContext::discardValueNames() const { return pImpl->DiscardValueNames; }
+bool LLVMContext::shouldDiscardValueNames() const { return pImpl->DiscardValueNames; }
void LLVMContext::setDiscardValueNames(bool Discard) {
pImpl->DiscardValueNames = Discard;
diff --git a/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp
index ca90b4368c4..468b2a721a4 100644
--- a/llvm/lib/IR/Value.cpp
+++ b/llvm/lib/IR/Value.cpp
@@ -199,7 +199,7 @@ StringRef Value::getName() const {
void Value::setNameImpl(const Twine &NewName) {
// Fast-path: LLVMContext can be set to strip out non-GlobalValue names
- if (getContext().discardValueNames() && !isa<GlobalValue>(this))
+ if (getContext().shouldDiscardValueNames() && !isa<GlobalValue>(this))
return;
// Fast path for common IRBuilder case of setName("") when there is no name.
OpenPOWER on IntegriCloud