Page MenuHomePhabricator

[Remarks][NFC] Move the serialization to lib/Remarks

Authored by thegameg on May 29 2019, 3:24 PM.



Separate the remark serialization to YAML from the LLVM Diagnostics.

This adds a new serialization abstraction: remarks::Serializer. It's completely independent from lib/IR and it provides an easy way to replace YAML by providing a new remarks::Serializer.

Diff Detail


Event Timeline

thegameg created this revision.May 29 2019, 3:24 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 29 2019, 3:24 PM
JDevlieghere accepted this revision.May 30 2019, 1:16 PM

LGTM. This seems straightforward. I skipped over the YAML stuff though, as it appears to have been moved.

This revision is now accepted and ready to land.May 30 2019, 1:16 PM
This revision was automatically updated to reflect the committed changes.
sbc100 added a subscriber: sbc100.May 30 2019, 4:55 PM

This seems to have broken the BUILD_SHARED_LIBS=ON build:

FAILED: lib/ 
: && /usr/local/google/home/sbc/dev/chromium/src/third_party/llvm-build/Release+Asserts/bin/clang++ -fPIC -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -O3  -fuse-ld=gold -Wl,-z,defs -Wl,-z,nodelete   -Wl,-rpath-link,/usr/local/google/home/sbc/dev/wasm/llvm-build/./lib  -Wl,-O3 -Wl,--gc-sections -shared -Wl,-soname, -o lib/ lib/LTO/CMakeFiles/LLVMLTO.dir/Caching.cpp.o lib/LTO/CMakeFiles/LLVMLTO.dir/LTO.cpp.o lib/LTO/CMakeFiles/LLVMLTO.dir/LTOBackend.cpp.o lib/LTO/CMakeFiles/LLVMLTO.dir/LTOModule.cpp.o lib/LTO/CMakeFiles/LLVMLTO.dir/LTOCodeGenerator.cpp.o lib/LTO/CMakeFiles/LLVMLTO.dir/SummaryBasedOptimizations.cpp.o lib/LTO/CMakeFiles/LLVMLTO.dir/UpdateCompilerUsed.cpp.o lib/LTO/CMakeFiles/LLVMLTO.dir/ThinLTOCodeGenerator.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib" lib/ lib/ lib/ lib/ lib/ lib/ lib/ lib/ lib/ lib/ lib/ lib/ lib/ lib/ lib/ lib/ lib/ && :
lib/LTO/CMakeFiles/LLVMLTO.dir/LTO.cpp.o:LTO.cpp:function llvm::lto::setupOptimizationRemarks(llvm::LLVMContext&, llvm::StringRef, llvm::StringRef, bool, int): error: undefined reference to 'llvm::remarks::YAMLSerializer::YAMLSerializer(llvm::raw_ostream&, llvm::remarks::UseStringTable)'

Sorry about that. Thanks @sbc100!