[all-commits] [llvm/llvm-project] c9cb4f: [DebugInfo] Store optional DIFile::Source as pointer

Jonas Hahnfeld via All-commits all-commits at lists.llvm.org
Thu Dec 8 00:59:19 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c9cb4fc761cd78d3a04feb211d363e91933a8e08
      https://github.com/llvm/llvm-project/commit/c9cb4fc761cd78d3a04feb211d363e91933a8e08
  Author: Jonas Hahnfeld <jonas.hahnfeld at cern.ch>
  Date:   2022-12-08 (Thu, 08 Dec 2022)

  Changed paths:
    M llvm/include/llvm/IR/DebugInfoMetadata.h
    M llvm/lib/AsmParser/LLParser.cpp
    M llvm/lib/Bitcode/Reader/MetadataLoader.cpp
    M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
    M llvm/lib/IR/DebugInfoMetadata.cpp
    M llvm/lib/IR/LLVMContextImpl.h
    M llvm/unittests/IR/DebugInfoTest.cpp
    M llvm/unittests/IR/MetadataTest.cpp

  Log Message:
  -----------
  [DebugInfo] Store optional DIFile::Source as pointer

getCanonicalMDString() also returns a nullptr for empty strings, which
tripped over the getSource() method. Solve the ambiguity of no source
versus an optional containing a nullptr by simply storing a pointer.

Differential Revision: https://reviews.llvm.org/D138658




More information about the All-commits mailing list