r299079 - Move NumRegParameters Module Flag. NFCI.

Yaron Keren via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 30 07:13:42 PDT 2017


Thanks!
If you like, might make sense now to move all these addModuleFlag() into a
new helper function, addModuleFlags().


‫בתאריך יום ה׳, 30 במרץ 2017 ב-16:54 מאת ‪Nirav Dave via cfe-commits‬‏ <‪
cfe-commits at lists.llvm.org‬‏>:‬

> Author: niravd
> Date: Thu Mar 30 08:41:44 2017
> New Revision: 299079
>
> URL: http://llvm.org/viewvc/llvm-project?rev=299079&view=rev
> Log:
> Move NumRegParameters Module Flag. NFCI.
>
> Modified:
>     cfe/trunk/lib/CodeGen/CodeGenModule.cpp
>
> Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=299079&r1=299078&r2=299079&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Thu Mar 30 08:41:44 2017
> @@ -159,12 +159,6 @@ CodeGenModule::CodeGenModule(ASTContext
>    // CoverageMappingModuleGen object.
>    if (CodeGenOpts.CoverageMapping)
>      CoverageMapping.reset(new CoverageMappingModuleGen(*this,
> *CoverageInfo));
> -
> -  // Record mregparm value now so it is visible through rest of codegen.
> -  if (Context.getTargetInfo().getTriple().getArch() == llvm::Triple::x86)
> -    getModule().addModuleFlag(llvm::Module::Error,
> "NumRegisterParameters",
> -                              CodeGenOpts.NumRegisterParameters);
> -
>  }
>
>  CodeGenModule::~CodeGenModule() {}
> @@ -424,6 +418,11 @@ void CodeGenModule::Release() {
>      EmitModuleLinkOptions();
>    }
>
> +  // Record mregparm value now so it is visible through rest of codegen.
> +  if (Context.getTargetInfo().getTriple().getArch() == llvm::Triple::x86)
> +    getModule().addModuleFlag(llvm::Module::Error,
> "NumRegisterParameters",
> +                              CodeGenOpts.NumRegisterParameters);
> +
>    if (CodeGenOpts.DwarfVersion) {
>      // We actually want the latest version when there are conflicts.
>      // We can change from Warning to Latest if such mode is supported.
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170330/396d990b/attachment-0001.html>


More information about the cfe-commits mailing list