[PATCH] Some code improvements (no functional change)

Artyom Skrobov Artyom.Skrobov at arm.com
Wed Apr 16 11:30:21 PDT 2014


Hello,

 

I suggest these three very simple improvements to LLVM source:

 

1)      Extracting the definition of SwapValue(), copypasted between
lib/Object/MachOObjectFile.cpp and lib/Object/MachOUniversal.cpp, into
include/llvm/Support/SwapByteOrder.h

2)      Extracting the definition of wrap(DataLayout) and
unwrap(LLVMTargetDataRef), copypasted between lib/Target/Target.cpp,
lib/Target/TargetMachineC.cpp, and
lib/ExecutionEngine/ExecutionEngineBindings.cpp, into
include/llvm-c/Target.h; and also deleting the unused definitions of
wrap(TargetLibraryInfo) and unwrap(LLVMTargetLibraryInfoRef) from
lib/Target/TargetMachineC.cpp

3)      Adding the re-include guards that were missing from
include/llvm/Support/Unicode.h, lib/Support/regcclass.h,
lib/Support/regcname.h, lib/Support/regex2.h, and lib/Support/regutils.h 

 

The three patches are independent, and none of them introduce any functional
change.

 

OK to commit?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140416/0837f44f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: include-guards.patch
Type: application/octet-stream
Size: 2992 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140416/0837f44f/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lib-Object-MachO.patch
Type: application/octet-stream
Size: 2331 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140416/0837f44f/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lib-Target.patch
Type: application/octet-stream
Size: 3458 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140416/0837f44f/attachment-0002.obj>


More information about the llvm-commits mailing list