#include "llvm/Object/Error.h"
#include "llvm/Support/FileOutputBuffer.h"
-namespace llvm {
-
-namespace object {
+using namespace llvm;
+using namespace llvm::object;
Expected<std::unique_ptr<OffloadBinary>>
OffloadBinary::create(MemoryBufferRef Buf) {
return MemoryBuffer::getMemBufferCopy(OS.str());
}
-OffloadKind getOffloadKind(StringRef Name) {
+OffloadKind object::getOffloadKind(StringRef Name) {
return llvm::StringSwitch<OffloadKind>(Name)
.Case("openmp", OFK_OpenMP)
.Case("cuda", OFK_Cuda)
.Default(OFK_None);
}
-StringRef getOffloadKindName(OffloadKind Kind) {
+StringRef object::getOffloadKindName(OffloadKind Kind) {
switch (Kind) {
case OFK_OpenMP:
return "openmp";
}
}
-ImageKind getImageKind(StringRef Name) {
+ImageKind object::getImageKind(StringRef Name) {
return llvm::StringSwitch<ImageKind>(Name)
.Case("o", IMG_Object)
.Case("bc", IMG_Bitcode)
.Default(IMG_None);
}
-StringRef getImageKindName(ImageKind Kind) {
+StringRef object::getImageKindName(ImageKind Kind) {
switch (Kind) {
case IMG_Object:
return "o";
return "";
}
}
-
-} // namespace object
-
-} // namespace llvm