[lld] r190585 - Do not hard code the leading underscore.

Joey Gouly joey.gouly at arm.com
Thu Sep 12 03:09:17 PDT 2013


Hi Rui,

> +  /// Returns the decorated name of the given symbol name. On 32-bit x86,
it
> +  /// adds "_" at the beginning of the string. On other architectures,
the
> +  /// return value is the same as the argument.
> +  StringRef decorateSymbol(StringRef name) const {
> +    // Because we don't support architectures other than 32-bit x86,
we'll
> +    // prepend an underscore unconditionally.
> +    std::string str = "_";
> +    str.append(name);
> +    return allocateString(str);
> +  }
> +

The doxygen comment and the implementation don't match here. I know you said
we only support
32-bit x86 for now, but how hard would it be to implement it correctly now?
Or change the doxygen comment to match the current implementation?

Joey







More information about the llvm-commits mailing list