[cfe-commits] r69346 - in /cfe/trunk: include/clang/Basic/LangOptions.h include/clang/Driver/Options.def lib/Driver/Tools.cpp tools/clang-cc/clang-cc.cpp
Fariborz Jahanian
fjahanian at apple.com
Thu Apr 16 20:04:15 PDT 2009
Author: fjahanian
Date: Thu Apr 16 22:04:15 2009
New Revision: 69346
URL: http://llvm.org/viewvc/llvm-project?rev=69346&view=rev
Log:
Added -print-ivar-layout option. No change in functionality
yet.
Modified:
cfe/trunk/include/clang/Basic/LangOptions.h
cfe/trunk/include/clang/Driver/Options.def
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/tools/clang-cc/clang-cc.cpp
Modified: cfe/trunk/include/clang/Basic/LangOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/LangOptions.h?rev=69346&r1=69345&r2=69346&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/LangOptions.h (original)
+++ cfe/trunk/include/clang/Basic/LangOptions.h Thu Apr 16 22:04:15 2009
@@ -76,6 +76,9 @@
// 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 @@
MathErrno = 1;
OverflowChecking = 0;
+ ObjCGCBitmapPrint = 0;
InstantiationDepth = 99;
Modified: cfe/trunk/include/clang/Driver/Options.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.def?rev=69346&r1=69345&r2=69346&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.def (original)
+++ cfe/trunk/include/clang/Driver/Options.def Thu Apr 16 22:04:15 2009
@@ -537,6 +537,7 @@
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)
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=69346&r1=69345&r2=69346&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Apr 16 22:04:15 2009
@@ -363,6 +363,7 @@
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.
Modified: cfe/trunk/tools/clang-cc/clang-cc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/clang-cc.cpp?rev=69346&r1=69345&r2=69346&view=diff
==============================================================================
--- cfe/trunk/tools/clang-cc/clang-cc.cpp (original)
+++ cfe/trunk/tools/clang-cc/clang-cc.cpp Thu Apr 16 22:04:15 2009
@@ -399,6 +399,10 @@
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 @@
else if (ObjCEnableGC)
Options.setGCMode(LangOptions::HybridGC);
+ if (ObjCEnableGCBitmapPrint)
+ Options.ObjCGCBitmapPrint = 1;
+
Options.setVisibilityMode(SymbolVisibility);
Options.OverflowChecking = OverflowChecking;
}
More information about the cfe-commits
mailing list