[llvm-commits] [llvm] r135918 - /llvm/trunk/tools/llvmc/examples/mcc16/Hooks.cpp
Oscar Fuentes
ofv at wanadoo.es
Mon Jul 25 10:24:54 PDT 2011
Author: ofv
Date: Mon Jul 25 12:24:54 2011
New Revision: 135918
URL: http://llvm.org/viewvc/llvm-project?rev=135918&view=rev
Log:
Fixes VS support for llvmc mcc16 llvmc example.
Patch by arrowdodger!
Modified:
llvm/trunk/tools/llvmc/examples/mcc16/Hooks.cpp
Modified: llvm/trunk/tools/llvmc/examples/mcc16/Hooks.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvmc/examples/mcc16/Hooks.cpp?rev=135918&r1=135917&r2=135918&view=diff
==============================================================================
--- llvm/trunk/tools/llvmc/examples/mcc16/Hooks.cpp (original)
+++ llvm/trunk/tools/llvmc/examples/mcc16/Hooks.cpp Mon Jul 25 12:24:54 2011
@@ -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 @@
// 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 @@
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 @@
std::string
GetUpperCasePartDefine(void) {
+ std::locale loc;
std::string Partname;
if (autogenerated::Parameter_p.empty()) {
Partname = "16f1xxx";
@@ -57,7 +60,7 @@
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;
More information about the llvm-commits
mailing list