OSDN Git Service

[LLVM-C] Add target triple normalization to the C API.
authorwhitequark <whitequark@whitequark.org>
Tue, 17 Jul 2018 10:57:39 +0000 (10:57 +0000)
committerwhitequark <whitequark@whitequark.org>
Tue, 17 Jul 2018 10:57:39 +0000 (10:57 +0000)
commit1907eb80ac01e7ed169c99c42977d1f7833b60a8
tree12a3886dec9009b415912e3b42eee8f92d21f723
parentf948d85a47da89f5c6c24892cbc20927f25a831d
[LLVM-C] Add target triple normalization to the C API.

rL333307 was introduced to remove automatic target triple
normalization when calling sys::getDefaultTargetTriple(), arguing
that users of the latter already called Triple::normalize()
if necessary. However, users of the C API currently have no way of
doing target triple normalization.

This patch introduces an LLVMNormalizeTargetTriple function to
the C API which wraps Triple::normalize() and can be used on
the result of LLVMGetDefaultTargetTriple to achieve the same effect.

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

Reviewed By: whitequark

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337263 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm-c/TargetMachine.h
lib/Target/TargetMachineC.cpp