This is an archive of the discontinued LLVM Phabricator instance.

Move UTF functions into namespace llvm.
ClosedPublic

Authored by jlebar on Sep 27 2016, 6:07 PM.

Details

Summary

This lets people link against LLVM and their own version of the UTF
library.

I determined this only affects llvm, clang, lld, and lldb by running

$ git grep -wl 'UTF[0-9]\+\|\bConvertUTF\bisLegalUTF\|getNumBytesFor' | cut -f 1 -d '/' | sort | uniq

clang
lld
lldb
llvm

Tested with

ninja lldb
ninja check-clang check-llvm check-lld

(ninja check-lldb doesn't complete for me with or without this patch.)

Diff Detail

Repository
rL LLVM

Event Timeline

jlebar updated this revision to Diff 72747.Sep 27 2016, 6:07 PM
jlebar retitled this revision from to Move UTF functions into namespace llvm..
jlebar updated this object.
jlebar added a reviewer: rnk.
jlebar added a subscriber: llvm-commits.
This revision was automatically updated to reflect the committed changes.
StefanVK added a subscriber: StefanVK.EditedSep 30 2016, 3:04 AM

This broke the build on windows/msvc (see http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/766)

Host/windows/Windows.cpp
Plugins/ObjectFile/PECOFF/WindowsMiniDump.cpp
Plugins/Process/Windows/MiniDump/ProcessWinMiniDump.cpp

use:
llvm::UTF16;
llvm::UTF8;
llvm::UTF32;
llvm::ConversionFlags;
llvm::conversionOK;
llvm::strictConversion;

But have no using declaration or other means of finding the moved typedefs

Edit: I wrote a possible patch https://reviews.llvm.org/D25089 (just added a few llvm::)

Sorry for the breakage. Interestingly I never got buildbot email about that one; I don't know if that's a bug.

llvm/trunk/include/llvm/Support/ConvertUTF.h