mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Fixes VS support for llvmc mcc16 llvmc example.
Patch by arrowdodger! llvm-svn: 135918
This commit is contained in:
parent
feb91f5361
commit
1654c23bb6
@ -3,9 +3,10 @@
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
#include <string>
|
||||
#include <locale>
|
||||
|
||||
namespace llvmc {
|
||||
extern char *ProgramName;
|
||||
extern const char *ProgramName;
|
||||
|
||||
namespace autogenerated {
|
||||
extern llvm::cl::opt<std::string> Parameter_p;
|
||||
@ -31,6 +32,7 @@ namespace hooks {
|
||||
// It is __partname format in lower case.
|
||||
std::string
|
||||
GetLowerCasePartDefine(void) {
|
||||
std::locale loc;
|
||||
std::string Partname;
|
||||
if (autogenerated::Parameter_p.empty()) {
|
||||
Partname = "16f1xxx";
|
||||
@ -40,7 +42,7 @@ GetLowerCasePartDefine(void) {
|
||||
|
||||
std::string LowerCase;
|
||||
for (unsigned i = 0; i < Partname.size(); i++) {
|
||||
LowerCase.push_back(std::tolower(Partname[i]));
|
||||
LowerCase.push_back(std::tolower(Partname[i], loc));
|
||||
}
|
||||
|
||||
return "__" + LowerCase;
|
||||
@ -48,6 +50,7 @@ GetLowerCasePartDefine(void) {
|
||||
|
||||
std::string
|
||||
GetUpperCasePartDefine(void) {
|
||||
std::locale loc;
|
||||
std::string Partname;
|
||||
if (autogenerated::Parameter_p.empty()) {
|
||||
Partname = "16f1xxx";
|
||||
@ -57,7 +60,7 @@ GetUpperCasePartDefine(void) {
|
||||
|
||||
std::string UpperCase;
|
||||
for (unsigned i = 0; i < Partname.size(); i++) {
|
||||
UpperCase.push_back(std::toupper(Partname[i]));
|
||||
UpperCase.push_back(std::toupper(Partname[i], loc));
|
||||
}
|
||||
|
||||
return "__" + UpperCase;
|
||||
|
Loading…
Reference in New Issue
Block a user