[PATCH] Remove object_error::success and use std::error_code() instead
Rui Ueyama
ruiu at google.com
Mon Jun 8 21:11:27 PDT 2015
Hi Bigcheese,
make_error_code(object_error) is slow because object::object_category()
uses a ManagedStatic variable. But the real problem is that the function is
called too frequently. This patch uses std::error_code() instead of
object_error::success. In most cases, we return "success", so this patch
reduces number of function calls to that function.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D10334
Files:
include/llvm/Object/COFF.h
include/llvm/Object/ELFObjectFile.h
include/llvm/Object/Error.h
include/llvm/Object/MachO.h
include/llvm/Object/ObjectFile.h
lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
lib/Object/Archive.cpp
lib/Object/COFFObjectFile.cpp
lib/Object/Error.cpp
lib/Object/IRObjectFile.cpp
lib/Object/MachOObjectFile.cpp
lib/Object/MachOUniversal.cpp
lib/Object/ObjectFile.cpp
tools/llvm-objdump/COFFDump.cpp
tools/llvm-objdump/llvm-objdump.cpp
tools/llvm-readobj/COFFDumper.cpp
tools/llvm-readobj/Win64EHDumper.cpp
tools/obj2yaml/coff2yaml.cpp
tools/obj2yaml/elf2yaml.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10334.27360.patch
Type: text/x-patch
Size: 33316 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150609/31466870/attachment.bin>
More information about the llvm-commits
mailing list