diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-04-17 03:04:15 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-04-17 03:04:15 +0000 |
commit | 448f5e6c191b40c90a67c48547df420d16f48b96 (patch) | |
tree | 23b1ea28d56837ed4eae19dacf647bec734c4c1a | |
parent | 072abefcddea5fb65e435cea60921b3c21c1279d (diff) |
Added -print-ivar-layout option. No change in functionality
yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69346 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Basic/LangOptions.h | 4 | ||||
-rw-r--r-- | include/clang/Driver/Options.def | 1 | ||||
-rw-r--r-- | lib/Driver/Tools.cpp | 1 | ||||
-rw-r--r-- | tools/clang-cc/clang-cc.cpp | 7 |
4 files changed, 13 insertions, 0 deletions
diff --git a/include/clang/Basic/LangOptions.h b/include/clang/Basic/LangOptions.h index 1198c6f20f..40b2e5372a 100644 --- a/include/clang/Basic/LangOptions.h +++ b/include/clang/Basic/LangOptions.h @@ -76,6 +76,9 @@ public: // used (instead of C99 semantics). unsigned NoInline : 1; // Should __NO_INLINE__ be defined. + unsigned ObjCGCBitmapPrint : 1; // Enable printing of gc's bitmap layout + // for __weak/__strong ivars. + private: unsigned GC : 2; // Objective-C Garbage Collection modes. We declare // this enum as unsigned because MSVC insists on making enums @@ -117,6 +120,7 @@ public: MathErrno = 1; OverflowChecking = 0; + ObjCGCBitmapPrint = 0; InstantiationDepth = 99; diff --git a/include/clang/Driver/Options.def b/include/clang/Driver/Options.def index bbc5901a03..33446212e5 100644 --- a/include/clang/Driver/Options.def +++ b/include/clang/Driver/Options.def @@ -537,6 +537,7 @@ OPTION("-prebind", prebind, Flag, INVALID, INVALID, "", 0, 0, 0) OPTION("-preload", preload, Flag, INVALID, INVALID, "", 0, 0, 0) OPTION("-print-file-name=", print_file_name_EQ, Joined, INVALID, INVALID, "", 0, "Print the full library path of <file>", "<file>") +OPTION("-print-ivar-layout", print_ivar_layout, Flag, INVALID, INVALID, "", 0, 0, 0) OPTION("-print-libgcc-file-name", print_libgcc_file_name, Flag, INVALID, INVALID, "", 0, "Print the library path for \"libgcc.a\"", 0) OPTION("-print-multi-directory", print_multi_directory, Flag, INVALID, INVALID, "u", 0, 0, 0) diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 8e4abb1157..ad83fe7e8e 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -363,6 +363,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.AddLastArg(CmdArgs, options::OPT_P); Args.AddLastArg(CmdArgs, options::OPT_mmacosx_version_min_EQ); Args.AddLastArg(CmdArgs, options::OPT_miphoneos_version_min_EQ); + Args.AddLastArg(CmdArgs, options::OPT_print_ivar_layout); // Special case debug options to only pass -g to clang. This is // wrong. diff --git a/tools/clang-cc/clang-cc.cpp b/tools/clang-cc/clang-cc.cpp index 7d1ce40135..e9e5c3744a 100644 --- a/tools/clang-cc/clang-cc.cpp +++ b/tools/clang-cc/clang-cc.cpp @@ -399,6 +399,10 @@ static llvm::cl::opt<bool> ObjCEnableGC("fobjc-gc", llvm::cl::desc("Enable Objective-C garbage collection")); +static llvm::cl::opt<bool> +ObjCEnableGCBitmapPrint("print-ivar-layout", + llvm::cl::desc("Enable Objective-C Ivar layout bitmap print trace")); + static llvm::cl::opt<LangOptions::VisibilityMode> SymbolVisibility("fvisibility", llvm::cl::desc("Set the default symbol visibility:"), @@ -517,6 +521,9 @@ static void InitializeLangOptions(LangOptions &Options, LangKind LK){ else if (ObjCEnableGC) Options.setGCMode(LangOptions::HybridGC); + if (ObjCEnableGCBitmapPrint) + Options.ObjCGCBitmapPrint = 1; + Options.setVisibilityMode(SymbolVisibility); Options.OverflowChecking = OverflowChecking; } |