[cfe-commits] r116990 - in /cfe/trunk: include/clang/Basic/LangOptions.h include/clang/Driver/CC1Options.td include/clang/Driver/Options.td lib/Basic/Targets.cpp lib/Driver/Tools.cpp lib/Frontend/CompilerInvocation.cpp lib/Serialization/ASTReader.cpp lib/Serialization/ASTWriter.cpp
Michael J. Spencer
bigcheesegs at gmail.com
Wed Oct 20 20:16:25 PDT 2010
Author: mspencer
Date: Wed Oct 20 22:16:25 2010
New Revision: 116990
URL: http://llvm.org/viewvc/llvm-project?rev=116990&view=rev
Log:
Fix Whitespace.
Modified:
cfe/trunk/include/clang/Basic/LangOptions.h
cfe/trunk/include/clang/Driver/CC1Options.td
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/lib/Basic/Targets.cpp
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
cfe/trunk/lib/Serialization/ASTReader.cpp
cfe/trunk/lib/Serialization/ASTWriter.cpp
Modified: cfe/trunk/include/clang/Basic/LangOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/LangOptions.h?rev=116990&r1=116989&r2=116990&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/LangOptions.h (original)
+++ cfe/trunk/include/clang/Basic/LangOptions.h Wed Oct 20 22:16:25 2010
@@ -93,7 +93,7 @@
// smallest integer type with enough room.
unsigned OpenCL : 1; // OpenCL C99 language extensions.
-
+
unsigned AssumeSaneOperatorNew : 1; // Whether to add __attribute__((malloc))
// to the declaration of C++'s new
// operators
@@ -104,7 +104,7 @@
unsigned DumpVTableLayouts : 1; /// Dump the layouts of emitted vtables.
unsigned NoConstantCFStrings : 1; // Do not do CF strings
unsigned InlineVisibilityHidden : 1; // Whether inline C++ methods have
- // hidden visibility by default.
+ // hidden visibility by default.
unsigned SpellChecking : 1; // Whether to perform spell-checking for error
// recovery.
@@ -131,7 +131,7 @@
Protected,
Hidden
};
-
+
enum SignedOverflowBehaviorTy {
SOB_Undefined, // Default C standard behavior.
SOB_Defined, // -fwrapv
@@ -157,14 +157,14 @@
AltiVec = OpenCL = StackProtector = 0;
SymbolVisibility = (unsigned) Default;
-
+
ThreadsafeStatics = 1;
POSIXThreads = 0;
Blocks = 0;
EmitAllDecls = 0;
MathErrno = 1;
SignedOverflowBehavior = SOB_Undefined;
-
+
AssumeSaneOperatorNew = 1;
AccessControl = 1;
ElideConstructors = 1;
@@ -207,7 +207,7 @@
return (VisibilityMode) SymbolVisibility;
}
void setVisibilityMode(VisibilityMode v) { SymbolVisibility = (unsigned) v; }
-
+
SignedOverflowBehaviorTy getSignedOverflowBehavior() const {
return (SignedOverflowBehaviorTy)SignedOverflowBehavior;
}
Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=116990&r1=116989&r2=116990&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Wed Oct 20 22:16:25 2010
@@ -88,7 +88,7 @@
def analyzer_opt_analyze_headers : Flag<"-analyzer-opt-analyze-headers">,
HelpText<"Force the static analyzer to analyze functions defined in header files">;
def analyzer_opt_analyze_nested_blocks : Flag<"-analyzer-opt-analyze-nested-blocks">,
- HelpText<"Analyze the definitions of blocks in addition to functions">;
+ HelpText<"Analyze the definitions of blocks in addition to functions">;
def analyzer_display_progress : Flag<"-analyzer-display-progress">,
HelpText<"Emit verbose output about the analyzer's progress">;
def analyzer_experimental_checks : Flag<"-analyzer-experimental-checks">,
@@ -230,7 +230,7 @@
HelpText<"Print diagnostic name with mappable diagnostics">;
def fdiagnostics_show_category : Separate<"-fdiagnostics-show-category">,
HelpText<"Print diagnostic category">;
-
+
def ftabstop : Separate<"-ftabstop">, MetaVarName<"<N>">,
HelpText<"Set the tab stop distance.">;
def ferror_limit : Separate<"-ferror-limit">, MetaVarName<"<N>">,
@@ -289,7 +289,7 @@
HelpText<"Load the named plugin (dynamic shared object)">;
def plugin : Separate<"-plugin">, MetaVarName<"<name>">,
HelpText<"Use the named plugin action (use \"help\" to list available options)">;
-def plugin_arg : JoinedAndSeparate<"-plugin-arg-">,
+def plugin_arg : JoinedAndSeparate<"-plugin-arg-">,
MetaVarName<"<name> <arg>">,
HelpText<"Pass <arg> to plugin <name>">;
def resource_dir : Separate<"-resource-dir">,
@@ -408,7 +408,7 @@
HelpText<"Emit all declarations, even if unused">;
def fblocks : Flag<"-fblocks">,
HelpText<"enable the 'blocks' language feature">;
-def fheinous_gnu_extensions : Flag<"-fheinous-gnu-extensions">;
+def fheinous_gnu_extensions : Flag<"-fheinous-gnu-extensions">;
def fexceptions : Flag<"-fexceptions">,
HelpText<"Enable support for exception handling">;
def fsjlj_exceptions : Flag<"-fsjlj-exceptions">,
@@ -438,7 +438,7 @@
def fno_signed_char : Flag<"-fno-signed-char">,
HelpText<"Char is unsigned">;
def fno_spell_checking : Flag<"-fno-spell-checking">,
- HelpText<"Disable spell-checking">;
+ HelpText<"Disable spell-checking">;
def fno_use_cxa_atexit : Flag<"-fno-use-cxa-atexit">,
HelpText<"Don't use __cxa_atexit for calling destructors">;
def fconstant_string_class : Separate<"-fconstant-string-class">,
@@ -561,7 +561,7 @@
HelpText<"undef all system defines">;
def detailed_preprocessing_record : Flag<"-detailed-preprocessing-record">,
HelpText<"include a detailed record of preprocessing actions">;
-
+
//===----------------------------------------------------------------------===//
// Preprocessed Output Options
//===----------------------------------------------------------------------===//
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=116990&r1=116989&r2=116990&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Wed Oct 20 22:16:25 2010
@@ -294,11 +294,11 @@
def fkeep_inline_functions : Flag<"-fkeep-inline-functions">, Group<clang_ignored_f_Group>;
def flat__namespace : Flag<"-flat_namespace">;
def flax_vector_conversions : Flag<"-flax-vector-conversions">, Group<f_Group>;
-def flimit_debug_info : Flag<"-flimit-debug-info">, Group<f_Group>,
+def flimit_debug_info : Flag<"-flimit-debug-info">, Group<f_Group>,
HelpText<"Limit debug information produced to reduce size of debug binary">;
def flimited_precision_EQ : Joined<"-flimited-precision=">, Group<f_Group>;
def flto : Flag<"-flto">, Group<f_Group>;
-def fmacro_backtrace_limit_EQ : Joined<"-fmacro-backtrace-limit=">,
+def fmacro_backtrace_limit_EQ : Joined<"-fmacro-backtrace-limit=">,
Group<f_Group>;
def fmath_errno : Flag<"-fmath-errno">, Group<f_Group>;
def fmerge_all_constants : Flag<"-fmerge-all-constants">, Group<f_Group>;
@@ -398,7 +398,7 @@
def ftabstop_EQ : Joined<"-ftabstop=">, Group<f_Group>;
def ferror_limit_EQ : Joined<"-ferror-limit=">, Group<f_Group>;
def ftemplate_depth_ : Joined<"-ftemplate-depth-">, Group<f_Group>;
-def ftemplate_backtrace_limit_EQ : Joined<"-ftemplate-backtrace-limit=">,
+def ftemplate_backtrace_limit_EQ : Joined<"-ftemplate-backtrace-limit=">,
Group<f_Group>;
def fterminated_vtables : Flag<"-fterminated-vtables">, Group<f_Group>;
def fthreadsafe_statics : Flag<"-fthreadsafe-statics">, Group<f_Group>;
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=116990&r1=116989&r2=116990&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Wed Oct 20 22:16:25 2010
@@ -160,12 +160,12 @@
return llvm::MCSectionMachO::ParseSectionSpecifier(SR, Segment, Section,
TAA, StubSize);
}
-
+
virtual const char *getStaticInitSectionSpecifier() const {
// FIXME: We should return 0 when building kexts.
return "__TEXT,__StaticInit,regular,pure_instructions";
}
-
+
};
@@ -458,16 +458,16 @@
// FIXME: The following are added to allow parsing.
// I just took a guess at what the actions should be.
// Also, is more specific checking needed? I.e. specific registers?
- case 'd': // Floating point register (containing 64-bit value)
+ case 'd': // Floating point register (containing 64-bit value)
case 'v': // Altivec vector register
Info.setAllowsRegister();
break;
case 'w':
switch (Name[1]) {
- case 'd':// VSX vector register to hold vector double data
- case 'f':// VSX vector register to hold vector float data
- case 's':// VSX vector register to hold scalar float data
- case 'a':// Any VSX register
+ case 'd':// VSX vector register to hold vector double data
+ case 'f':// VSX vector register to hold vector float data
+ case 's':// VSX vector register to hold scalar float data
+ case 'a':// Any VSX register
break;
default:
return false;
@@ -475,27 +475,27 @@
Info.setAllowsRegister();
Name++; // Skip over 'w'.
break;
- case 'h': // `MQ', `CTR', or `LINK' register
- case 'q': // `MQ' register
- case 'c': // `CTR' register
- case 'l': // `LINK' register
- case 'x': // `CR' register (condition register) number 0
- case 'y': // `CR' register (condition register)
- case 'z': // `XER[CA]' carry bit (part of the XER register)
+ case 'h': // `MQ', `CTR', or `LINK' register
+ case 'q': // `MQ' register
+ case 'c': // `CTR' register
+ case 'l': // `LINK' register
+ case 'x': // `CR' register (condition register) number 0
+ case 'y': // `CR' register (condition register)
+ case 'z': // `XER[CA]' carry bit (part of the XER register)
Info.setAllowsRegister();
break;
- case 'I': // Signed 16-bit constant
+ case 'I': // Signed 16-bit constant
case 'J': // Unsigned 16-bit constant shifted left 16 bits
- // (use `L' instead for SImode constants)
- case 'K': // Unsigned 16-bit constant
- case 'L': // Signed 16-bit constant shifted left 16 bits
- case 'M': // Constant larger than 31
- case 'N': // Exact power of 2
- case 'P': // Constant whose negation is a signed 16-bit constant
+ // (use `L' instead for SImode constants)
+ case 'K': // Unsigned 16-bit constant
+ case 'L': // Signed 16-bit constant shifted left 16 bits
+ case 'M': // Constant larger than 31
+ case 'N': // Exact power of 2
+ case 'P': // Constant whose negation is a signed 16-bit constant
case 'G': // Floating point constant that can be loaded into a
- // register with one instruction per word
+ // register with one instruction per word
case 'H': // Integer/Floating point constant that can be loaded
- // into a register using three instructions
+ // into a register using three instructions
break;
case 'm': // Memory operand. Note that on PowerPC targets, m can
// include addresses that update the base register. It
@@ -503,13 +503,13 @@
// if that asm statement accesses the operand exactly once.
// The asm statement must also use `%U<opno>' as a
// placeholder for the "update" flag in the corresponding
- // load or store instruction. For example:
+ // load or store instruction. For example:
// asm ("st%U0 %1,%0" : "=m" (mem) : "r" (val));
- // is correct but:
+ // is correct but:
// asm ("st %1,%0" : "=m" (mem) : "r" (val));
// is not. Use es rather than m if you don't want the base
- // register to be updated.
- case 'e':
+ // register to be updated.
+ case 'e':
if (Name[1] != 's')
return false;
// es: A "stable" memory operand; that is, one which does not
@@ -521,23 +521,23 @@
Name++; // Skip over 'e'.
break;
case 'Q': // Memory operand that is an offset from a register (it is
- // usually better to use `m' or `es' in asm statements)
+ // usually better to use `m' or `es' in asm statements)
case 'Z': // Memory operand that is an indexed or indirect from a
// register (it is usually better to use `m' or `es' in
- // asm statements)
+ // asm statements)
Info.setAllowsMemory();
Info.setAllowsRegister();
break;
- case 'R': // AIX TOC entry
+ case 'R': // AIX TOC entry
case 'a': // Address operand that is an indexed or indirect from a
- // register (`p' is preferable for asm statements)
- case 'S': // Constant suitable as a 64-bit mask operand
- case 'T': // Constant suitable as a 32-bit mask operand
- case 'U': // System V Release 4 small data area reference
+ // register (`p' is preferable for asm statements)
+ case 'S': // Constant suitable as a 64-bit mask operand
+ case 'T': // Constant suitable as a 32-bit mask operand
+ case 'U': // System V Release 4 small data area reference
case 't': // AND masks that can be performed by two rldic{l, r}
- // instructions
- case 'W': // Vector constant that does not require memory
- case 'j': // Vector constant that is all zeros.
+ // instructions
+ case 'W': // Vector constant that does not require memory
+ case 'j': // Vector constant that is all zeros.
break;
// End FIXME.
}
@@ -584,7 +584,7 @@
// FIXME: Should be controlled by command line option.
Builder.defineMacro("__LONG_DOUBLE_128__");
-
+
if (Opts.AltiVec) {
Builder.defineMacro("__VEC__", "10206");
Builder.defineMacro("__ALTIVEC__");
@@ -1116,13 +1116,13 @@
.Case("mmx", MMX)
.Default(NoMMXSSE);
SSELevel = std::max(SSELevel, Level);
-
- AMD3DNowEnum ThreeDNowLevel =
+
+ AMD3DNowEnum ThreeDNowLevel =
llvm::StringSwitch<AMD3DNowEnum>(Features[i].substr(1))
.Case("3dnowa", AMD3DNowAthlon)
.Case("3dnow", AMD3DNow)
.Default(NoAMD3DNow);
-
+
AMD3DNowLevel = std::max(AMD3DNowLevel, ThreeDNowLevel);
}
}
@@ -1284,7 +1284,7 @@
virtual const char *getVAListDeclaration() const {
return "typedef char* __builtin_va_list;";
}
-
+
int getEHDataRegisterNumber(unsigned RegNo) const {
if (RegNo == 0) return 0;
if (RegNo == 1) return 2;
@@ -1595,7 +1595,7 @@
// {} in inline assembly are neon specifiers, not assembly variant
// specifiers.
NoAsmVariants = true;
-
+
// FIXME: Should we just treat this as a feature?
IsThumb = getTriple().getArchName().startswith("thumb");
if (IsThumb) {
@@ -1660,7 +1660,7 @@
else if (CPU == "cortex-a8" || CPU == "cortex-a9")
Features["neon"] = true;
}
-
+
virtual bool setFeatureEnabled(llvm::StringMap<bool> &Features,
const std::string &Name,
bool Enabled) const {
@@ -2335,7 +2335,7 @@
};
const char * const MipsTargetInfo::GCCRegNames[] = {
- "$0", "$1", "$2", "$3", "$4", "$5", "$6", "$7",
+ "$0", "$1", "$2", "$3", "$4", "$5", "$6", "$7",
"$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15",
"$16", "$17", "$18", "$19", "$20", "$21", "$22", "$23",
"$24", "$25", "$26", "$27", "$28", "$sp", "$fp", "$31",
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=116990&r1=116989&r2=116990&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Oct 20 22:16:25 2010
@@ -943,7 +943,7 @@
// toolchains which have the integrated assembler on by default.
bool IsVerboseAsmDefault = getToolChain().IsIntegratedAssemblerDefault();
if (Args.hasFlag(options::OPT_fverbose_asm, options::OPT_fno_verbose_asm,
- IsVerboseAsmDefault) ||
+ IsVerboseAsmDefault) ||
Args.hasArg(options::OPT_dA))
CmdArgs.push_back("-masm-verbose");
@@ -1182,7 +1182,7 @@
}
Args.AddLastArg(CmdArgs, options::OPT_fvisibility_inlines_hidden);
-
+
// -fhosted is default.
if (KernelOrKext || Args.hasFlag(options::OPT_ffreestanding,
options::OPT_fhosted,
@@ -1297,7 +1297,7 @@
CmdArgs.push_back("-fno-signed-char");
// -fthreadsafe-static is default.
- if (!Args.hasFlag(options::OPT_fthreadsafe_statics,
+ if (!Args.hasFlag(options::OPT_fthreadsafe_statics,
options::OPT_fno_threadsafe_statics))
CmdArgs.push_back("-fno-threadsafe-statics");
@@ -1327,7 +1327,7 @@
// -fnext-runtime defaults to on Darwin and when rewriting Objective-C, and is
// -the -cc1 default.
- bool NeXTRuntimeIsDefault =
+ bool NeXTRuntimeIsDefault =
IsRewriter || getToolChain().getTriple().getOS() == llvm::Triple::Darwin;
if (!Args.hasFlag(options::OPT_fnext_runtime, options::OPT_fgnu_runtime,
NeXTRuntimeIsDefault))
@@ -1375,7 +1375,7 @@
Version = 1;
}
}
-
+
if (Version == 2 || Version == 3) {
if (Version == 2)
CmdArgs.push_back("-fobjc-nonfragile-abi");
@@ -1598,7 +1598,7 @@
(*it)->claim();
D.Diag(clang::diag::warn_drv_clang_unsupported) << (*it)->getAsString(Args);
}
-
+
// Claim some arguments which clang supports automatically.
// -fpch-preprocess is used with gcc to add a special marker in the output to
@@ -1797,7 +1797,7 @@
if (JA.getType() != types::TY_PP_Asm)
D.Diag(clang::diag::err_drv_invalid_gcc_output_type)
<< getTypeName(JA.getType());
-
+
CmdArgs.push_back("-S");
}
}
@@ -2545,7 +2545,7 @@
// categories.
if (Args.hasArg(options::OPT_ObjC) || Args.hasArg(options::OPT_ObjCXX))
CmdArgs.push_back("-ObjC");
-
+
CmdArgs.push_back("-o");
CmdArgs.push_back(Output.getFilename());
@@ -2955,7 +2955,7 @@
if (getToolChain().getArchName() == "i386")
CmdArgs.push_back("--32");
-
+
// Set byte order explicitly
if (getToolChain().getArchName() == "mips")
CmdArgs.push_back("-EB");
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=116990&r1=116989&r2=116990&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Wed Oct 20 22:16:25 2010
@@ -152,7 +152,7 @@
// TimePasses is only derived.
// UnitAtATime is unused.
// Inlining is only derived.
-
+
// UnrollLoops is derived, but also accepts an option, no
// harm in pushing it back here.
if (Opts.UnrollLoops)
@@ -577,7 +577,7 @@
switch (Opts.getSignedOverflowBehavior()) {
case LangOptions::SOB_Undefined: break;
case LangOptions::SOB_Defined: Res.push_back("-fwrapv"); break;
- case LangOptions::SOB_Trapping:
+ case LangOptions::SOB_Trapping:
Res.push_back("-ftrapv"); break;
if (!Opts.OverflowHandler.empty()) {
Res.push_back("-ftrapv-handler");
@@ -634,7 +634,7 @@
}
if (Opts.InlineVisibilityHidden)
Res.push_back("-fvisibility-inlines-hidden");
-
+
if (Opts.getStackProtectorMode() != 0) {
Res.push_back("-stack-protector");
Res.push_back(llvm::utostr(Opts.getStackProtectorMode()));
@@ -866,7 +866,7 @@
Opts.OptimizeSize = Args.hasArg(OPT_Os);
Opts.SimplifyLibCalls = !(Args.hasArg(OPT_fno_builtin) ||
Args.hasArg(OPT_ffreestanding));
- Opts.UnrollLoops = Args.hasArg(OPT_funroll_loops) ||
+ Opts.UnrollLoops = Args.hasArg(OPT_funroll_loops) ||
(Opts.OptimizationLevel > 1 && !Opts.OptimizeSize);
Opts.AsmVerbose = Args.hasArg(OPT_masm_verbose);
@@ -953,17 +953,17 @@
Diags.Report(diag::err_drv_invalid_value)
<< Args.getLastArg(OPT_fdiagnostics_show_category)->getAsString(Args)
<< ShowCategory;
-
+
Opts.ShowSourceRanges = Args.hasArg(OPT_fdiagnostics_print_source_range_info);
Opts.ShowParseableFixits = Args.hasArg(OPT_fdiagnostics_parseable_fixits);
Opts.VerifyDiagnostics = Args.hasArg(OPT_verify);
Opts.ErrorLimit = Args.getLastArgIntValue(OPT_ferror_limit, 0, Diags);
Opts.MacroBacktraceLimit
- = Args.getLastArgIntValue(OPT_fmacro_backtrace_limit,
+ = Args.getLastArgIntValue(OPT_fmacro_backtrace_limit,
DiagnosticOptions::DefaultMacroBacktraceLimit, Diags);
Opts.TemplateBacktraceLimit
- = Args.getLastArgIntValue(OPT_ftemplate_backtrace_limit,
- DiagnosticOptions::DefaultTemplateBacktraceLimit,
+ = Args.getLastArgIntValue(OPT_ftemplate_backtrace_limit,
+ DiagnosticOptions::DefaultTemplateBacktraceLimit,
Diags);
Opts.TabStop = Args.getLastArgIntValue(OPT_ftabstop,
DiagnosticOptions::DefaultTabStop, Diags);
@@ -1313,15 +1313,15 @@
if (Args.hasArg(OPT_fvisibility_inlines_hidden))
Opts.InlineVisibilityHidden = 1;
-
+
if (Args.hasArg(OPT_ftrapv)) {
- Opts.setSignedOverflowBehavior(LangOptions::SOB_Trapping);
+ Opts.setSignedOverflowBehavior(LangOptions::SOB_Trapping);
// Set the handler, if one is specified.
Opts.OverflowHandler =
Args.getLastArgValue(OPT_ftrapv_handler);
}
else if (Args.hasArg(OPT_fwrapv))
- Opts.setSignedOverflowBehavior(LangOptions::SOB_Defined);
+ Opts.setSignedOverflowBehavior(LangOptions::SOB_Defined);
// Mimicing gcc's behavior, trigraphs are only enabled if -trigraphs
// is specified, or -std is set to a conforming mode.
@@ -1423,7 +1423,7 @@
size_t Comma = Value.find(',');
unsigned Bytes = 0;
unsigned EndOfLine = 0;
-
+
if (Comma == llvm::StringRef::npos ||
Value.substr(0, Comma).getAsInteger(10, Bytes) ||
Value.substr(Comma + 1).getAsInteger(10, EndOfLine))
@@ -1433,7 +1433,7 @@
Opts.PrecompiledPreambleBytes.second = (EndOfLine != 0);
}
}
-
+
// Add macros from the command line.
for (arg_iterator it = Args.filtered_begin(OPT_D, OPT_U),
ie = Args.filtered_end(); it != ie; ++it) {
Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=116990&r1=116989&r2=116990&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Wed Oct 20 22:16:25 2010
@@ -81,7 +81,7 @@
PARSE_LANGOPT_IMPORTANT(ObjC2, diag::warn_pch_objective_c2);
PARSE_LANGOPT_IMPORTANT(ObjCNonFragileABI, diag::warn_pch_nonfragile_abi);
PARSE_LANGOPT_IMPORTANT(ObjCNonFragileABI2, diag::warn_pch_nonfragile_abi2);
- PARSE_LANGOPT_IMPORTANT(NoConstantCFStrings,
+ PARSE_LANGOPT_IMPORTANT(NoConstantCFStrings,
diag::warn_pch_no_constant_cfstrings);
PARSE_LANGOPT_BENIGN(PascalStrings);
PARSE_LANGOPT_BENIGN(WritableStrings);
@@ -791,7 +791,7 @@
case DeclarationName::CXXUsingDirective:
break;
}
-
+
return Key;
}
@@ -853,7 +853,7 @@
case DeclarationName::ObjCZeroArgSelector:
case DeclarationName::ObjCOneArgSelector:
case DeclarationName::ObjCMultiArgSelector:
- Key.Data =
+ Key.Data =
(uint64_t)Reader.DecodeSelector(ReadUnalignedLE32(d)).getAsOpaquePtr();
break;
case DeclarationName::CXXConstructorName:
@@ -870,7 +870,7 @@
case DeclarationName::CXXUsingDirective:
break;
}
-
+
return Key;
}
@@ -1339,7 +1339,7 @@
while (true) {
uint64_t Offset = Cursor.GetCurrentBitNo();
unsigned Code = Cursor.ReadCode();
-
+
// We expect all abbrevs to be at the start of the block.
if (Code != llvm::bitc::DEFINE_ABBREV) {
Cursor.JumpToBit(Offset);
@@ -1388,7 +1388,7 @@
unsigned BlobLen = 0;
Record.clear();
PreprocessorRecordTypes RecType =
- (PreprocessorRecordTypes)Stream.ReadRecord(Code, Record, BlobStart,
+ (PreprocessorRecordTypes)Stream.ReadRecord(Code, Record, BlobStart,
BlobLen);
switch (RecType) {
case PP_MACRO_OBJECT_LIKE:
@@ -1436,13 +1436,13 @@
// Remember that we saw this macro last so that we add the tokens that
// form its body to it.
Macro = MI;
-
+
if (NextIndex + 1 == Record.size() && PP->getPreprocessingRecord()) {
// We have a macro definition. Load it now.
PP->getPreprocessingRecord()->RegisterMacroDefinition(Macro,
getMacroDefinition(Record[NextIndex]));
}
-
+
++NumMacrosRead;
break;
}
@@ -1463,19 +1463,19 @@
Macro->AddTokenToBody(Tok);
break;
}
-
+
case PP_MACRO_INSTANTIATION: {
// If we already have a macro, that means that we've hit the end
// of the definition of the macro we were looking for. We're
// done.
if (Macro)
return;
-
+
if (!PP->getPreprocessingRecord()) {
Error("missing preprocessing record in AST file");
return;
}
-
+
PreprocessingRecord &PPRec = *PP->getPreprocessingRecord();
if (PPRec.getPreprocessedEntity(Record[0]))
return;
@@ -1495,23 +1495,23 @@
// done.
if (Macro)
return;
-
+
if (!PP->getPreprocessingRecord()) {
Error("missing preprocessing record in AST file");
return;
}
-
+
PreprocessingRecord &PPRec = *PP->getPreprocessingRecord();
if (PPRec.getPreprocessedEntity(Record[0]))
return;
-
+
if (Record[1] > MacroDefinitionsLoaded.size()) {
Error("out-of-bounds macro definition record");
return;
}
// Decode the identifier info and then check again; if the macro is
- // still defined and associated with the identifier,
+ // still defined and associated with the identifier,
IdentifierInfo *II = DecodeIdentifierInfo(Record[4]);
if (!MacroDefinitionsLoaded[Record[1] - 1]) {
MacroDefinition *MD
@@ -1520,38 +1520,38 @@
SourceRange(
ReadSourceLocation(F, Record[2]),
ReadSourceLocation(F, Record[3])));
-
+
PPRec.SetPreallocatedEntity(Record[0], MD);
MacroDefinitionsLoaded[Record[1] - 1] = MD;
-
+
if (DeserializationListener)
DeserializationListener->MacroDefinitionRead(Record[1], MD);
}
-
+
return;
}
-
+
case PP_INCLUSION_DIRECTIVE: {
// If we already have a macro, that means that we've hit the end
// of the definition of the macro we were looking for. We're
// done.
if (Macro)
return;
-
+
if (!PP->getPreprocessingRecord()) {
Error("missing preprocessing record in AST file");
return;
}
-
+
PreprocessingRecord &PPRec = *PP->getPreprocessingRecord();
if (PPRec.getPreprocessedEntity(Record[0]))
return;
const char *FullFileNameStart = BlobStart + Record[3];
- const FileEntry *File
+ const FileEntry *File
= PP->getFileManager().getFile(FullFileNameStart,
FullFileNameStart + (BlobLen - Record[3]));
-
+
// FIXME: Stable encoding
InclusionDirective::InclusionKind Kind
= static_cast<InclusionDirective::InclusionKind>(Record[5]);
@@ -1580,7 +1580,7 @@
llvm::BitstreamCursor Cursor = MacroCursor;
Cursor.JumpToBit(F.MacroStartOffset);
-
+
RecordData Record;
while (true) {
uint64_t Offset = Cursor.GetCurrentBitNo();
@@ -1619,7 +1619,7 @@
case PP_TOKEN:
// Ignore tokens.
break;
-
+
case PP_MACRO_INSTANTIATION:
case PP_MACRO_DEFINITION:
case PP_INCLUSION_DIRECTIVE:
@@ -2805,7 +2805,7 @@
llvm::SmallVector<ObjCProtocolDecl*, 4> Protos;
for (unsigned I = 0; I != NumProtos; ++I)
Protos.push_back(cast<ObjCProtocolDecl>(GetDecl(Record[Idx++])));
- return Context->getObjCObjectType(Base, Protos.data(), NumProtos);
+ return Context->getObjCObjectType(Base, Protos.data(), NumProtos);
}
case TYPE_OBJC_OBJECT_POINTER: {
@@ -2831,7 +2831,7 @@
return
QualType(new (*Context, TypeAlignment) InjectedClassNameType(D, TST), 0);
}
-
+
case TYPE_TEMPLATE_TYPE_PARM: {
unsigned Idx = 0;
unsigned Depth = Record[Idx++];
@@ -2840,7 +2840,7 @@
IdentifierInfo *Name = GetIdentifierInfo(Record, Idx);
return Context->getTemplateTypeParmType(Depth, Index, Pack, Name);
}
-
+
case TYPE_DEPENDENT_NAME: {
unsigned Idx = 0;
ElaboratedTypeKeyword Keyword = (ElaboratedTypeKeyword)Record[Idx++];
@@ -2849,7 +2849,7 @@
QualType Canon = GetType(Record[Idx++]);
return Context->getDependentNameType(Keyword, NNS, Name, Canon);
}
-
+
case TYPE_DEPENDENT_TEMPLATE_SPECIALIZATION: {
unsigned Idx = 0;
ElaboratedTypeKeyword Keyword = (ElaboratedTypeKeyword)Record[Idx++];
@@ -2863,7 +2863,7 @@
return Context->getDependentTemplateSpecializationType(Keyword, NNS, Name,
Args.size(), Args.data());
}
-
+
case TYPE_DEPENDENT_SIZED_ARRAY: {
unsigned Idx = 0;
@@ -3832,7 +3832,7 @@
return SelectorsLoaded[ID - 1];
}
-Selector ASTReader::GetExternalSelector(uint32_t ID) {
+Selector ASTReader::GetExternalSelector(uint32_t ID) {
return DecodeSelector(ID);
}
@@ -3938,7 +3938,7 @@
TemplateName
ASTReader::ReadTemplateName(const RecordData &Record, unsigned &Idx) {
- TemplateName::NameKind Kind = (TemplateName::NameKind)Record[Idx++];
+ TemplateName::NameKind Kind = (TemplateName::NameKind)Record[Idx++];
switch (Kind) {
case TemplateName::Template:
return TemplateName(cast_or_null<TemplateDecl>(GetDecl(Record[Idx++])));
@@ -3951,14 +3951,14 @@
return Context->getOverloadedTemplateName(Decls.begin(), Decls.end());
}
-
+
case TemplateName::QualifiedTemplate: {
NestedNameSpecifier *NNS = ReadNestedNameSpecifier(Record, Idx);
bool hasTemplKeyword = Record[Idx++];
TemplateDecl *Template = cast<TemplateDecl>(GetDecl(Record[Idx++]));
return Context->getQualifiedTemplateName(NNS, hasTemplKeyword, Template);
}
-
+
case TemplateName::DependentTemplate: {
NestedNameSpecifier *NNS = ReadNestedNameSpecifier(Record, Idx);
if (Record[Idx++]) // isIdentifier
@@ -3968,7 +3968,7 @@
(OverloadedOperatorKind)Record[Idx++]);
}
}
-
+
assert(0 && "Unhandled template name kind!");
return TemplateName();
}
@@ -4003,7 +4003,7 @@
return TemplArg;
}
}
-
+
assert(0 && "Unhandled template argument kind!");
return TemplateArgument();
}
@@ -4020,8 +4020,8 @@
Params.reserve(NumParams);
while (NumParams--)
Params.push_back(cast<NamedDecl>(GetDecl(Record[Idx++])));
-
- TemplateParameterList* TemplateParams =
+
+ TemplateParameterList* TemplateParams =
TemplateParameterList::Create(*Context, TemplateLoc, LAngleLoc,
Params.data(), Params.size(), RAngleLoc);
return TemplateParams;
@@ -4075,7 +4075,7 @@
TypeSourceInfo *BaseClassInfo = 0;
bool IsBaseVirtual = false;
FieldDecl *Member = 0;
-
+
bool IsBaseInitializer = Record[Idx++];
if (IsBaseInitializer) {
BaseClassInfo = GetTypeSourceInfo(F, Record, Idx);
@@ -4100,7 +4100,7 @@
for (unsigned i=0; i != SourceOrderOrNumArrayIndices; ++i)
Indices.push_back(cast<VarDecl>(GetDecl(Record[Idx++])));
}
-
+
CXXBaseOrMemberInitializer *BOMInit;
if (IsBaseInitializer) {
BOMInit = new (C) CXXBaseOrMemberInitializer(C, BaseClassInfo,
Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=116990&r1=116989&r2=116990&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriter.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriter.cpp Wed Oct 20 22:16:25 2010
@@ -643,7 +643,7 @@
RECORD(MACRO_DEFINITION_OFFSETS);
RECORD(CHAINED_METADATA);
RECORD(REFERENCED_SELECTOR_POOL);
-
+
// SourceManager Block.
BLOCK(SOURCE_MANAGER_BLOCK);
RECORD(SM_SLOC_FILE_ENTRY);
@@ -659,7 +659,7 @@
RECORD(PP_TOKEN);
RECORD(PP_MACRO_INSTANTIATION);
RECORD(PP_MACRO_DEFINITION);
-
+
// Decls and Types block.
BLOCK(DECLTYPES_BLOCK);
RECORD(TYPE_EXT_QUAL);
@@ -1279,9 +1279,9 @@
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // in quotes
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 2)); // kind
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob));
- InclusionAbbrev = Stream.EmitAbbrev(Abbrev);
+ InclusionAbbrev = Stream.EmitAbbrev(Abbrev);
}
-
+
for (Preprocessor::macro_iterator I = PP.macro_begin(), E = PP.macro_end();
I != E; ++I) {
// FIXME: This emits macros in hash table order, we should do it in a stable
@@ -1296,7 +1296,7 @@
// the macro comes from the original PCH but the identifier comes from a
// chained PCH, by storing the offset into the original PCH rather than
// writing the macro definition a second time.
- if (MI->isBuiltinMacro() ||
+ if (MI->isBuiltinMacro() ||
(Chain && I->first->isFromAST() && MI->isFromAST()))
continue;
@@ -1318,12 +1318,12 @@
I != E; ++I)
AddIdentifierRef(*I, Record);
}
-
+
// If we have a detailed preprocessing record, record the macro definition
// ID that corresponds to this macro.
if (PPRec)
Record.push_back(getMacroDefinitionID(PPRec->findMacroDefinition(MI)));
-
+
Stream.EmitRecord(Code, Record);
Record.clear();
@@ -1351,7 +1351,7 @@
}
++NumMacros;
}
-
+
// If the preprocessor has a preprocessing record, emit it.
unsigned NumPreprocessingRecords = 0;
if (PPRec) {
@@ -1360,7 +1360,7 @@
EEnd = PPRec->end(Chain);
E != EEnd; ++E) {
Record.clear();
-
+
if (MacroInstantiation *MI = dyn_cast<MacroInstantiation>(*E)) {
Record.push_back(IndexBase + NumPreprocessingRecords++);
AddSourceLocation(MI->getSourceRange().getBegin(), Record);
@@ -1370,24 +1370,24 @@
Stream.EmitRecord(PP_MACRO_INSTANTIATION, Record);
continue;
}
-
+
if (MacroDefinition *MD = dyn_cast<MacroDefinition>(*E)) {
// Record this macro definition's location.
MacroID ID = getMacroDefinitionID(MD);
-
+
// Don't write the macro definition if it is from another AST file.
if (ID < FirstMacroID)
continue;
-
+
unsigned Position = ID - FirstMacroID;
if (Position != MacroDefinitionOffsets.size()) {
if (Position > MacroDefinitionOffsets.size())
MacroDefinitionOffsets.resize(Position + 1);
-
- MacroDefinitionOffsets[Position] = Stream.GetCurrentBitNo();
+
+ MacroDefinitionOffsets[Position] = Stream.GetCurrentBitNo();
} else
MacroDefinitionOffsets.push_back(Stream.GetCurrentBitNo());
-
+
Record.push_back(IndexBase + NumPreprocessingRecords++);
Record.push_back(ID);
AddSourceLocation(MD->getSourceRange().getBegin(), Record);
@@ -1397,7 +1397,7 @@
Stream.EmitRecord(PP_MACRO_DEFINITION, Record);
continue;
}
-
+
if (InclusionDirective *ID = dyn_cast<InclusionDirective>(*E)) {
Record.push_back(PP_INCLUSION_DIRECTIVE);
Record.push_back(IndexBase + NumPreprocessingRecords++);
@@ -1414,9 +1414,9 @@
}
}
}
-
+
Stream.ExitBlock();
-
+
// Write the offsets table for the preprocessing record.
if (NumPreprocessingRecords > 0) {
// Write the offsets table for identifier IDs.
@@ -1427,7 +1427,7 @@
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 32)); // # of macro defs
Abbrev->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Blob));
unsigned MacroDefOffsetAbbrev = Stream.EmitAbbrev(Abbrev);
-
+
Record.clear();
Record.push_back(MACRO_DEFINITION_OFFSETS);
Record.push_back(NumPreprocessingRecords);
@@ -3046,7 +3046,7 @@
}
void ASTWriter::AddTemplateName(TemplateName Name, RecordData &Record) {
- TemplateName::NameKind Kind = Name.getKind();
+ TemplateName::NameKind Kind = Name.getKind();
Record.push_back(Kind);
switch (Kind) {
case TemplateName::Template:
@@ -3061,7 +3061,7 @@
AddDeclRef(*I, Record);
break;
}
-
+
case TemplateName::QualifiedTemplate: {
QualifiedTemplateName *QualT = Name.getAsQualifiedTemplateName();
AddNestedNameSpecifier(QualT->getQualifier(), Record);
@@ -3069,7 +3069,7 @@
AddDeclRef(QualT->getTemplateDecl(), Record);
break;
}
-
+
case TemplateName::DependentTemplate: {
DependentTemplateName *DepT = Name.getAsDependentTemplateName();
AddNestedNameSpecifier(DepT->getQualifier(), Record);
@@ -3083,7 +3083,7 @@
}
}
-void ASTWriter::AddTemplateArgument(const TemplateArgument &Arg,
+void ASTWriter::AddTemplateArgument(const TemplateArgument &Arg,
RecordData &Record) {
Record.push_back(Arg.getKind());
switch (Arg.getKind()) {
@@ -3206,7 +3206,7 @@
void ASTWriter::TypeRead(TypeIdx Idx, QualType T) {
// Always take the highest-numbered type index. This copes with an interesting
// case for chained AST writing where we schedule writing the type and then,
- // later, deserialize the type from another AST. In this case, we want to
+ // later, deserialize the type from another AST. In this case, we want to
// keep the higher-numbered entry so that we can properly write it out to
// the AST file.
TypeIdx &StoredIdx = TypeIdxs[T];
@@ -3222,7 +3222,7 @@
SelectorIDs[S] = ID;
}
-void ASTWriter::MacroDefinitionRead(serialization::MacroID ID,
+void ASTWriter::MacroDefinitionRead(serialization::MacroID ID,
MacroDefinition *MD) {
MacroDefinitions[MD] = ID;
}
More information about the cfe-commits
mailing list