[llvm] r174304 - PR15149: crash when printing debug info metadata containing an invalid language spec

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Mar 28 11:18:51 PDT 2013


testcase?

On 3 February 2013 21:31, David Blaikie <dblaikie at gmail.com> wrote:
> Author: dblaikie
> Date: Sun Feb  3 23:31:37 2013
> New Revision: 174304
>
> URL: http://llvm.org/viewvc/llvm-project?rev=174304&view=rev
> Log:
> PR15149: crash when printing debug info metadata containing an invalid language spec
>
> Modified:
>     llvm/trunk/lib/IR/DebugInfo.cpp
>
> Modified: llvm/trunk/lib/IR/DebugInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfo.cpp?rev=174304&r1=174303&r2=174304&view=diff
> ==============================================================================
> --- llvm/trunk/lib/IR/DebugInfo.cpp (original)
> +++ llvm/trunk/lib/IR/DebugInfo.cpp Sun Feb  3 23:31:37 2013
> @@ -1058,8 +1058,8 @@ void DIScope::printInternal(raw_ostream
>
>  void DICompileUnit::printInternal(raw_ostream &OS) const {
>    DIScope::printInternal(OS);
> -  if (unsigned Lang = getLanguage())
> -    OS << " [" << dwarf::LanguageString(Lang) << ']';
> +  if (const char *Lang = dwarf::LanguageString(getLanguage()))
> +    OS << " [" << Lang << ']';
>  }
>
>  void DIEnumerator::printInternal(raw_ostream &OS) const {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list