Ignore:
Timestamp:
Mar 19, 2018, 8:54:15 AM (18 months ago)
Author:
cameron
Message:

Mangler function

Location:
icGREP/icgrep-devel/icgrep/IR_Gen
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IR_Gen/CBuilder.cpp

    r5865 r5916  
    66
    77#include "CBuilder.h"
     8#include <llvm/IR/Mangler.h>
    89#include <llvm/IR/Module.h>
    910#include <llvm/IR/Constants.h>
     
    5152    return ((n & (n - 1)) == 0) && n;
    5253}
     54
     55std::string CBuilder::getMangledName(std::string s) {
     56    DataLayout DL(getModule());
     57    std::string MangledName;
     58    raw_string_ostream MangledNameStream(MangledName);
     59    Mangler::getNameWithPrefix(MangledNameStream, s, DL);
     60    return MangledName;
     61}
     62
    5363
    5464#ifdef HAS_ADDRESS_SANITIZER
  • icGREP/icgrep-devel/icgrep/IR_Gen/CBuilder.h

    r5865 r5916  
    4848        ClearInsertionPoint();
    4949    }
     50   
     51    std::string getMangledName(std::string s);
    5052   
    5153    // UDiv and URem with optimization for division by power-of-2 constants
Note: See TracChangeset for help on using the changeset viewer.