[llvm-commits] [llvm] r98221 - in /llvm/trunk: include/llvm/Target/TargetAsmBackend.h lib/Target/X86/X86AsmBackend.cpp

Chris Lattner clattner at apple.com
Tue Mar 16 11:42:17 PDT 2010


On Mar 10, 2010, at 5:34 PM, Daniel Dunbar wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=98221&view=rev
> Log:
> MC: Sketch some TargetAsmBackend hooks we are going to need.

Hey Daniel, minor point:

> +++ llvm/trunk/include/llvm/Target/TargetAsmBackend.h Wed Mar 10 19:34:21 2010
> @@ -28,6 +28,28 @@
> 
>   const Target &getTarget() const { return TheTarget; }
...

> 
> +  /// Note that the assembler currently does not reason about atoms, instead it
> +  /// assumes all temporary symbols reside in the "current atom".
> +  virtual bool hasScatteredSymbols() const { return false; }

For properties input-free predicates like this, instead of using virtual methods, you can just have a field in the class that the subclass initializes, allowing the method to be inline.

-Chris  



More information about the llvm-commits mailing list