[llvm-commits] [llvm] r42074 - in /llvm/trunk: include/llvm/CodeGen/AsmPrinter.h lib/CodeGen/AsmPrinter.cpp lib/CodeGen/DwarfWriter.cpp test/CodeGen/X86/2007-09-17-ObjcFrameEH.ll

Chris Lattner clattner at apple.com
Mon Sep 17 21:05:50 PDT 2007


On Sep 17, 2007, at 6:47 PM, Bill Wendling wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=42074&view=rev
> Log:
> Objective-C was generating EH frame info like this:
>
> "_-[NSString(local) isNullOrNil]".eh = 0
>         .no_dead_strip  "_-[NSString(local) isNullOrNil]".eh

> +    /// Cache of mangled exception handling name for current  
> function. This is
> +    /// recalculated at the beginning of each call to  
> runOnMachineFunction().
> +    ///
> +    std::string CurrentFnEHName;


This should be reset to "" at the start or end of the function,  
right?  We don't want subsequent functions to reuse earlier functions  
names.

> +const std::string &
> +AsmPrinter::getCurrentFunctionEHName(const MachineFunction *MF) {
> +  assert(MF && "No machine function?");
> +  if (CurrentFnEHName != "") return CurrentFnEHName;

please use "if (!CurrentFnEHName.empty())".

Thanks Bill,

-Chris



More information about the llvm-commits mailing list