[PATCH] Some code improvements (no functional change)

Duncan P. N. Exon Smith dexonsmith at apple.com
Wed Apr 16 11:55:16 PDT 2014


On 2014-Apr-16, at 11:30, Artyom Skrobov <Artyom.Skrobov at arm.com> wrote:

> Hello,
>  
> I suggest these three very simple improvements to LLVM source:
>  
> 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 

diff --git a/include/llvm/Support/Unicode.h b/include/llvm/Support/Unicode.h
index e6a52c4..f668a5b 100644
--- a/include/llvm/Support/Unicode.h
+++ b/include/llvm/Support/Unicode.h
@@ -12,6 +12,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#ifndef LLVM_SUPPORT_UNICODE_H
+#define LLVM_SUPPORT_UNICODE_H
+
 #include "llvm/ADT/StringRef.h"
 
 namespace llvm {
@@ -60,3 +63,5 @@ int columnWidthUTF8(StringRef Text);
 } // namespace unicode
 } // namespace sys
 } // namespace llvm
+
+#endif

This change (to include/llvm/Support/Unicode.h) LGTM.

I don't think the code churn of the other include guards is worth it.
They're private headers that work together as is, and haven't been
modified since the original commit.



More information about the llvm-commits mailing list