aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/COFFModuleDefinition.cpp
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2021-10-11 16:34:41 +0200
committerRaphael Isemann <teemperor@gmail.com>2021-10-11 16:36:57 +0200
commitbdc35b0efca9445950990fe642f18c3d82ab1299 (patch)
tree293f044380e788f485c83b2d38f90f5a04abbb56 /llvm/lib/Object/COFFModuleDefinition.cpp
parentc3abfe4207d35c221f1667d5b0c79a6511be5ea3 (diff)
downloadllvm-bdc35b0efca9445950990fe642f18c3d82ab1299.zip
llvm-bdc35b0efca9445950990fe642f18c3d82ab1299.tar.gz
llvm-bdc35b0efca9445950990fe642f18c3d82ab1299.tar.bz2
[Object] Deduplicate the three createError functions
The Object library currently has three identical functions that translate a Twine into a parser error. Until recently these functions have coexisted peacefully, but since D110320 Clang with enabled modules is now diagnosing that we have several definitions of `createError` in Object. This patch just merges them all and puts them into Object's `Error.h` where the error code for `parse_failed` is also defined which seems cleaner and unbreaks the bots. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D111541
Diffstat (limited to 'llvm/lib/Object/COFFModuleDefinition.cpp')
-rw-r--r--llvm/lib/Object/COFFModuleDefinition.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/llvm/lib/Object/COFFModuleDefinition.cpp b/llvm/lib/Object/COFFModuleDefinition.cpp
index 8f29f7a..55ddd3b 100644
--- a/llvm/lib/Object/COFFModuleDefinition.cpp
+++ b/llvm/lib/Object/COFFModuleDefinition.cpp
@@ -80,11 +80,6 @@ static bool isDecorated(StringRef Sym, bool MingwDef) {
(!MingwDef && Sym.contains('@'));
}
-static Error createError(const Twine &Err) {
- return make_error<StringError>(StringRef(Err.str()),
- object_error::parse_failed);
-}
-
class Lexer {
public:
Lexer(StringRef S) : Buf(S) {}