Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ade3505f authored by Christopher Ferris's avatar Christopher Ferris Committed by android-build-merger
Browse files

Merge "Implement a simple demangler." am: 3f4f1a1a

am: 9cd41b37

Change-Id: Ifbbf564465552aa06013177c44786f9787545684
parents 56c920ae 9cd41b37
Loading
Loading
Loading
Loading

demangle/Android.bp

0 → 100644
+65 −0
Original line number Original line Diff line number Diff line
//
// Copyright (C) 2017 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

cc_defaults {
    name: "libdemangle_defaults",

    host_supported: true,

    cflags: [
        "-Wall",
        "-Werror",
        "-Wextra",
    ],
}

cc_library {
    name: "libdemangle",
    defaults: ["libdemangle_defaults"],

    srcs: [
        "Demangler.cpp",
    ],

    local_include_dirs: [
       "include",
    ],

    export_include_dirs: [
       "include",
    ],
}

//-------------------------------------------------------------------------
// Unit Tests
//-------------------------------------------------------------------------
cc_test {
    name: "libdemangle_test",
    defaults: ["libdemangle_defaults"],

    srcs: [
        "DemangleTest.cpp",
    ],

    cflags: [
        "-O0",
        "-g",
    ],

    shared_libs: [
        "libdemangle",
    ],
}
+436 −0

File added.

Preview size limit exceeded, changes collapsed.

demangle/Demangler.cpp

0 → 100644
+746 −0

File added.

Preview size limit exceeded, changes collapsed.

demangle/Demangler.h

0 → 100644
+191 −0

File added.

Preview size limit exceeded, changes collapsed.

+27 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef __LIB_DEMANGLE_H_
#define __LIB_DEMANGLE_H_

#include <string>

// If the name cannot be demangled, the original name will be returned as
// a std::string. If the name can be demangled, then the demangled name
// will be returned as a std::string.
std::string demangle(const char* name);

#endif  // __LIB_DEMANGLE_H_