diff options
| author | Mehdi Amini <mehdi.amini@apple.com> | 2016-04-02 03:46:17 +0000 |
|---|---|---|
| committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-04-02 03:46:17 +0000 |
| commit | 50af49fcdcf7cd48655553441dd25f58c0167c4f (patch) | |
| tree | 02e05a520917ec537b6a0fc20ca139e7fb9a3a0f /llvm/lib | |
| parent | c2822bd3d1ea4e8a4dd7107b62299476d19d4587 (diff) | |
| download | bcm5719-llvm-50af49fcdcf7cd48655553441dd25f58c0167c4f.tar.gz bcm5719-llvm-50af49fcdcf7cd48655553441dd25f58c0167c4f.zip | |
Rename Context::discardValueNames() to shouldDiscardValueNames() (NFC)
Suggested by Sean Silva.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 265211
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/IR/LLVMContext.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/IR/Value.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
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. |

