[PATCH] Fixing a clang crash with duplicate mangled name

Yunzhong Gao Yunzhong_Gao at playstation.sony.com
Wed Apr 8 15:52:06 PDT 2015


A Darwin-targeted clang may not crash with the original test case,  because the __asm() renaming on Darwin prepends
'\01' to the new function name. The following test case should crash on Darwin.

$ clang -S -emit-llvm -o - test.cpp
$ clang -S -femit-all-decls -emit-llvm -o - test.cpp

// test.cpp
extern "C" int printf(const char *, ...);

extern "C" {

  void _ZN1SC2Ev(void) { }

}

struct S {

  S() {
    printf("S constructor\n");
  };

} var;


http://reviews.llvm.org/D8405

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list