mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 23:23:38 -04:00
AMDGPU/NFC: Minor clean ups in PAL metadata
- Move PAL metadata definitions to AMDGPUMetadata - Make naming consistent with HSA metadata Differential Revision: https://reviews.llvm.org/D38745 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315523 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/ADT/Twine.h"
|
||||
#include "llvm/Support/AMDGPUMetadata.h"
|
||||
#include "llvm/Support/YAMLTraits.h"
|
||||
|
||||
@@ -213,5 +214,19 @@ std::error_code Metadata::toYamlString(
|
||||
}
|
||||
|
||||
} // end namespace HSAMD
|
||||
|
||||
namespace PALMD {
|
||||
|
||||
std::error_code toString(const Metadata &PALMetadata, std::string &String) {
|
||||
raw_string_ostream Stream(String);
|
||||
for (auto I = PALMetadata.begin(), E = PALMetadata.end(); I != E; ++I) {
|
||||
Stream << Twine(I == PALMetadata.begin() ? " 0x" : ",0x");
|
||||
Stream << Twine::utohexstr(*I);
|
||||
}
|
||||
Stream.flush();
|
||||
return std::error_code();
|
||||
}
|
||||
|
||||
} // end namespace PALMD
|
||||
} // end namespace AMDGPU
|
||||
} // end namespace llvm
|
||||
|
||||
Reference in New Issue
Block a user